<template>
	<view class="content">
		<view class="box">
			<view class="label">
				重置全员状态
			</view>
			<view class="btn-group">
				<button type="primary" @click="resetBtn(1)">重 置</button>
			</view>
		</view>
		<view class="box">
			<view class="label">
				重置点亮人数
			</view>
			<view class="btn-group">
				<button type="primary" @click="resetBtn(2)">重 置</button>
			</view>
		</view>
		<view class="box">
			<view class="label">
				设置全部人数
			</view>
			<input type="number" value="" v-model="newnum" style="border: 1px solid #2C405A;"/>
			<view class="btn-group">
				<button type="primary" @click="resetBtn(3)">设 置</button>
			</view>
		</view>
		<view class="box">
			<view class="label">
				清空报名表
			</view>
			<view class="btn-group">
				<button type="primary" @click="resetBtn(4)">清 空</button>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				newnum:0
			}
		},
		methods: {
			resetBtn(num){
				uniCloud.callFunction({
					name:'admin',
					data:{num:num,newnum:this.newnum}
				}).then((res)=>{
					console.log(res)
				})
			}
		}
	}
</script>

<style scoped>
.box{
	margin: 20rpx 0;
	display: flex;
	flex-direction: row;
	justify-content: space-around;
	align-items: center;
	width: 100%;
	border-bottom: 1px #007AFF dashed;
	padding-bottom: 30rpx;
}
</style>
